﻿/* 
 * Godtear.com
 * bzure@live.cn
 * QQ:37434800
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bzure.Security.Permissions
{
    public interface ICopy<T>
    {
        T Copy();
    }
    public interface IContains
    {
        bool Contains(object obj);
    }
    public interface IContains<T>
    {
        bool Contains(T obj);
    }
    public interface IDroit : ICopy<IDroit>, IContains<IAccessCode>
    {
        string Guid { get; }
        string Description { get; set; }
        IList<IAccessCode> AccessCodes { get; }
        void AddAccessCode(IAccessCode AccessCode);
        void RemoveAccessCode(IAccessCode AccessCode);
        bool IsSubsetOf(IDroit Droit);
    }
    public interface IDroit<T> : ICopy<IDroit<T>>, IContains<IAccessCode<T>>
    {
        string Guid { get; }
        string Description { get; set; }
        IList<IAccessCode<T>> AccessCodes { get; }
        void AddAccessCode(IAccessCode<T> AccessCode);
        void RemoveAccessCode(IAccessCode<T> AccessCode);
        bool IsSubsetOf(IDroit<T> Droit);
    }
}
